<!--#INCLUDE FILE="config.asp"-->

<%

' Endcrypt information of CC
'Set objEncrypter = Server.CreateObject ("Hyeongryeol.StringEncrypter")
'objEncrypter.Key = edCode
'objEncrypter.InitialVector = conIV

'if(Session("SalesAccessLevel") <> 4 ) then
'	Response.Redirect("default.asp")
'end if
if(request("sId") <> "") then
SaleID = request("sId")
SaleIDNew = request("newsale")

'encrypttitle = objEncrypter.Encrypt ( title )

		set objConnect = server.createObject("ADODB.Connection")       
		objConnect.open conStr

		Set oCmd = Server.CreateObject("ADODB.Command")

		oCmd.ActiveConnection = objConnect
		oCmd.CommandText = "sp_transfer_all_prospects" 
		oCmd.CommandType = 4

		Set SaleID = oCmd.CreateParameter("@SaleID", 3,1,100, SaleID)
		oCmd.Parameters.Append SaleID
		
		Set SaleIDNew = oCmd.CreateParameter("@SaleIDNew", 3,1,100, SaleIDNew)
		oCmd.Parameters.Append SaleIDNew

		set rss = oCmd.execute
		Response.Redirect("sales-view-prospects-per-salesperson.asp?sId="&SaleID)
	else
		Response.Redirect("sales-view-salespeople.asp")
end if
%>